#ifndef GROUPSESSIONDETAILWIDGET_H
#define GROUPSESSIONDETAILWIDGET_H

#include <QDialog>
#include <QWidget>
#include <QLabel>
#include <QGridLayout>
#include <QLineEdit>

#include "sessiondetailwidget.h"

class AvatarItem;

class GroupSessionDetailWidget : public QDialog
{
    Q_OBJECT
public:
    GroupSessionDetailWidget(QWidget* parent);

    void initData();
    void initMembers(const QString& chatSessionId);

    void addMember(AvatarItem* avatarItem);

    void clickNameSubmitBtn();
    void clickNameSubmitBtnDone(bool ok, const QString& reason);
    void clickQuitGroupBtn();
    void clickQuitGroupBtnDone();
private:
    QGridLayout* glayout;
    QLabel* groupNameLabel;
    QLineEdit* groupNameEdit;
    QPushButton* nameSubmitBtn;
    QList<UserInfo>* memberList;
    QPushButton* modifyBtn;
    QHBoxLayout* hlayout;

    // 显示头像的列表 -- 行列
    int curRow = 0;
    int curCol = 1;
};

#endif // GROUPSESSIONDETAILWIDGET_H
